package Creational.Factory.SimpleFactory.demo1;

public class OperationSimpleFactory {
	private OperationSimpleFactory() {}

	public static Operation getInstance(String operate) {
		switch (operate) {
			case "+":
				return new OperationAdd();
			case "-":
				return new OperationSub();
			default:
				throw new RuntimeException("not support");
		}
	}
}
